-
Notifications
You must be signed in to change notification settings - Fork 5.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DNS resolver profile for ENS #1185
Conversation
EIPS/eip-1185.md
Outdated
|
||
Traditionally, DNS is a zone-based system in that all of the records for a zone are kept together in the same file. This has the benefit of simplicity and atomicity of zone updates, but when transposed to ENS can result in significant gas costs for simple changes. As a result, the resolver provides the ability to store either zone-based or record-based DNS information for a given domain, each with their own set of functions for managing the information. | ||
|
||
The primary reason that a user might choose to use the zone-based functions is if the zone uses information that spans multiple records and requires strict ordering (for example DNSSEC with NSSEC/NSSEC3 records), so an unordered record-based storage system is not possible. If this is not a consideration then record-based storage is generally cheaper and more flexible. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DNSSEC doesn't require this; as long as you can fetch the relevant records, they can be sorted by the verifier.
EIPS/eip-1185.md
Outdated
|
||
The resolver profile to support DNS on ENS builds on the standalone resolver as defined in #137. | ||
|
||
Traditionally, DNS is a zone-based system in that all of the records for a zone are kept together in the same file. This has the benefit of simplicity and atomicity of zone updates, but when transposed to ENS can result in significant gas costs for simple changes. As a result, the resolver provides the ability to store either zone-based or record-based DNS information for a given domain, each with their own set of functions for managing the information. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think offering both options is a mistake; it complicates use for everyone.
EIPS/eip-1185.md
Outdated
|
||
The function returns all matching records in DNS wire format. If there are no records present the function will return nothing. | ||
|
||
### hasDNSRecords(bytes32 node, bytes32 name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be simpler to just call dnsRecord
to check if it returns an empty string?
EIPS/eip-1185.md
Outdated
- node: the nodehash of the fully-qualified domain in ENS for which to set the records. Node hashes are defined in #137 | ||
- data: 1 or more DNS records in DNS wire format. | ||
|
||
### dnsRecord(bytes32 node, bytes32 name, uint16 resource) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be called dnsRecords
? It also needs to specify a return type.
EIPS/eip-1185.md
Outdated
|
||
The function returns the entire zone in DNS wire format. If there is no zone present the function will return nothing. | ||
|
||
### clearDNSZone(bytes32 node) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just call setDNSZone
with an empty string?
|
||
### setDNSRecords(bytes32 node, bytes data) | ||
|
||
`setDNSRecords()` sets, updates or clears 1 or more DNS records for a given node. It has function signature `0x0af179d7`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say "a DNS RRset", rather than "1 or more DNS records"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data can contain multiple RRsets; we could change this to "1 or more DNS RRsets".
|
||
The DNS resolver interface consists of two functions to set DNS information and two functions to query DNS information. | ||
|
||
### setDNSRecords(bytes32 node, bytes data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not have this take the name and RRType as well? Then the resolver doesn't have the overhead of having to parse records etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This allows setDNSRecords()
to take multiple RRsets in a single update.
Added an EIP that defines the DNS resolver profile for ENS resolvers.